home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / fractal / kaos.lha / auxlib / aux_copy_proc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-18  |  1.2 KB  |  40 lines

  1. /*
  2. ### Copy the contents of combined space data to phase or param space data ###
  3.  
  4. Note: region_index: 0=copy to phase space data, 1=copy to param sapce data
  5. */
  6. void
  7. aux_copy_proc()
  8. {
  9.         int i,j;
  10.         extern int stop,region_index;
  11.         extern int n_stored_data0,n_stored_data1,n_stored_data2;
  12.     extern int param_dim,var_dim,func_dim,full_dim;
  13.         extern int *data0_color,*data1_color,*data2_color;
  14.     extern double **data0_x, **data1_x, **data2_x;
  15.         if(region_index == 0){
  16.                 for(i=0;i<n_stored_data2;i++){
  17.                         data0_color[n_stored_data0] = data2_color[i];
  18.                         for(j=0;j<param_dim;j++)
  19.                                 data0_x[j][n_stored_data0] =data2_x[j+full_dim][i];
  20.                         n_stored_data0++;
  21.             if(stop)
  22.                 return;
  23.                 }
  24.         }
  25.         else if (region_index == 1){
  26.                 for(i=0;i<n_stored_data2;i++){
  27.             data1_color[n_stored_data1]=data2_color[i];
  28.                         for(j=0;j<full_dim;j++)
  29.                                 data1_x[j][n_stored_data1] = data2_x[j][i];
  30.                         n_stored_data1++;
  31.             if(stop)
  32.                 return;
  33.                 }
  34.         }
  35.         else {
  36.                 return;
  37.         }
  38. }
  39.  
  40.